package puzzle.projecteuler.p100;

import astudy.util.AdvMath;


public class Problem069 {

	/**
	 * phi(n)/n = (1-1/p1)...(1-1/pm)
	 * @param args
	 */
	public static void main(String[] args) {
		
		Integer[] ps = AdvMath.primes(1000000);
		Integer n = 1;
		for (Integer p: ps) {
			if (n*p <= 1000000) {
				n *= p;
			} else {
				break;
			}
		}
		System.out.println(n);
	}

}
